function showPage(opts, targetHtmlId) {
	$.ajax({
		url: opts.url,
		type: opts.type,
		dataType: 'json',
		data: opts.data,
	})
	.done(function(data) {
		renderTpl(data, targetHtmlId)
	})
}

function renderTpl(data, targetHtmlId) {
	var tpl = document.getElementById(targetHtmlId || 'tpl').innerHTML
	var render = laytpl(tpl).render(data);
	document.getElementById('container').innerHTML = render;
}
